/*
 * SelectElement.cpp
 *
 *  Created on: 2010-6-7
 *      Author: Guobc
 */

#include "SelectElement.h"

using namespace HA;

string SelectElement::mIds[] = { "SELECT" , ""};
string SelectElement::mEnds[] = { "SELECT", "INPUT", "TEXTAREA", "FORM",
		"BODY", "HTML" , ""};

SelectElement::SelectElement() :
	HA::CommonElement() {

}

ASTNodeList SelectElement::getOptionElments(){
	ASTNodeList options;
	ASTNodeList children = getChildren();
	ASTNode* node;
	OptionElement* option;
	int size = children.size();
	for(int i = 0; i < size; i++){
		node = children.item(i);
		option = dynamic_cast<OptionElement*> (node);
		if(option != NULL){
			options.append(option);
		}
	}

	return options;
}
